<?php
session_start();
include_once 'recursos/config.php';
    $cfg = new configuracion();
    
$dominio = $cfg->getG2uDominio()."/";
$_REQUEST["eid"] = str_replace("event_", "", $_REQUEST["eid"]);

?>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <title> :: Gift 2 You :: <?=$_SESSION["g2uUserName"]?></title>
        
        <link rel="shortcut icon" type="image/ico" href="<?=$dominio?>images/vineta-globo.png" />
        <link type="text/css" href="<?=$dominio?>css/g2u.css" rel="stylesheet"  media="screen" />
        <link type="text/css" href="<?=$dominio?>css/tipsy.css" rel="stylesheet"  media="screen" />
        
        <link type="text/css" href="<?=$dominio?>css/events.css" rel="stylesheet"  media="screen" />
        
        <!--SCROLL-->
        <link type="text/css" href="<?=$dominio?>css/jquery.mCustomScrollbar.css" rel="stylesheet"  media="screen" />

        <link type="text/css" href="<?=$dominio?>css/jquery-ui.css" rel="stylesheet"  media="screen" />

        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/jquery-1.9.1.js"></script>
        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/g2u.js"></script>
        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/tipsy.js"></script>

        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/jquery-ui.js"></script>
        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/events.js"></script>
        
        <!-- SCROLL -->
        <script lang="javascript" type="text/javascript" src="<?=$dominio?>js/jquery.mCustomScrollbar.js"></script>
        
    </head>
    <body>
        <table cellpadding="0" cellspacing="0" style="width: 100%; height: 100%; border-color: lightgray;" border="0">
            <tr>
                <td style="width: 20%; vertical-align: top;  ">
                    <div>
                        <center>
                            <img src="<?=$dominio?>images/logo.png"/>
                        </center>
                    </div>

                    <div>
                        <center>
                            <img id="ppicPortal" src="<?=$dominio.$_SESSION["g2uProfilePic"]?>" />
                            <img src="<?=$dominio?>images/png/salir.png" style="cursor: pointer;" onclick="logOut();"  width="18px" />
                            <br/>        
                            <?=$_SESSION["g2uFirstName"]?>
                        </center>
                    </div>
                    
                    <div id="menu">
                        <? include_once 'menu.php'; ?>
                    </div>
                    
                </td>
                <td style="width: 80%; vertical-align: top; padding-right: 50px; " >
                    
                    <div id="contentBody">
                        
                        <div id="eventHead">
                            Evento
                        </div>
                        
                        <div id="eventBody">
                            
                            <table>
                                <tr>
                                    <td rowspan="4">
                                        <img src="<?=$dominio?>images/png/calendario_evento.png" />
                                    </td>
                                    <td>
                                        <?=htmlspecialchars($_SESSION["g2uEventList"][$_REQUEST["eid"]]["name"])?>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <font style="color: gray; font-size: 10pt;"><?=$_SESSION["g2uEventList"][$_REQUEST["eid"]]["date"]?></font>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <font style="color: gray; font-size: 10pt;">
                                        <?
                                        if($value["creator"]==$_SESSION["g2uId"]){
                                            ?>
                                            Creador
                                            <?
                                        } else {
                                            ?>
                                            Invitado
                                            <?
                                        }
                                        ?>
                                        </font>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <font style="color: gray; font-size: 10pt;"><?=$_SESSION["g2uEventList"][$_REQUEST["eid"]]["count"]?> Participantes</font>
                                    </td>
                                </tr>
                            </table>
                            
                            <div id="eventInnerBody" style="height: 400px; overflow: auto;" >

                                <div id="capaEventTabs" style="display: none;">
                                    <div id="tabs">
                                        <ul>
                                          <li><a href="#muro"><img src="<?=$dominio?>images/png/wishlist.png" style="border: none;" height="24px"/> Muro</a></li>
                                          <li><a href="#amigos"><img src="<?=$dominio?>images/png/amigos.png" style="border: none;" height="24px"/> Participantes</a></li>
                                          <!--<li><a href="#wishlist"><img src="images/png/agregar_amigos.png" style="border: none;" height="24px"/> Agregar Amigos</a></li>-->
                                        </ul>
                                        <div id="muro">
                                            <table style="width: 100%" >
                                                <tr>
                                                    <td style="vertical-align: top;">
                                                        <form action="<?=$dominio?>upload.php" method="post" target="uploadResult" enctype="multipart/form-data" id="uploadForm" onsubmit="return validarForm();">
                                                            <table>
                                                                <tr>
                                                                    <td>
                                                                        <textarea id="comentario" name="comentario" rows="4" cols="40" required="required"></textarea> 
                                                                        <input type="hidden" id="lat" name="lat" value="" />
                                                                        <input type="hidden" id="long" name="long" value="" />
                                                                        <input type="hidden" id="acc" name="acc" value="" />
                                                                        <input type="hidden" id="wishlist" name="wishlist" value="0" />
                                                                        <input type="hidden" id="evento" name="evento" value="<?=$_REQUEST["eid"]?>" />
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <img src="<?=$dominio?>images/png/camara.png" width="16" />:<input type="file" name="file" id="file">
                                                                    </td>
                                                                </tr>
                                                                <tr>
                                                                    <td>
                                                                        <input type="submit" name="submit" value="Postear" id="Postear">
                                                                        <iframe id="uploadResult" name="uploadResult" width="100%" height="30px" style="border-width: 0px;"></iframe>
                                                                    </td>
                                                                </tr>
                                                            </table>
                                                        </form>
                                                    </td>
                                                    <td>
                                                        <div id="left"  style="overflow: auto; height: 300px;">
                                                        <? include_once 'vista/vista.news_list.php';  ?>    
                                                        </div>

                                                    </td>
                                                </tr>
                                            </table>
                                            
                                        </div>
                                        <div id="amigos">
                                            <? 
                                            //include_once 'vista/vista.event_friendlist.php';
                                            ?>
                                        </div>
                                        
                                     </div>
                                 </div>
                       
                            </div>
                        </div>
                    </div>
                </td>
            </tr>
        </table>
        
    <script type="text/javascript">
        $(window).ready(function(){
            /*$("#eventInnerBody").mCustomScrollbar({
                theme:"dark"
            });*/         
            $("#left").mCustomScrollbar({
                theme:"dark"
            });
        });
        
        $(function() {
            $("#tabs").tabs();
        });
        
        
        
        $(document).ready(function(){
            $("#capaEventTabs").ready(function(){
                $("tabs").ready(function(){
                    $("#capaEventTabs").slideDown();
                });
            });
        });
    </script>
    <style>
        #muro{
            font-family: g2u;
            font-size: 11pt;
        }
    </style>    
    </body>
</html>